Note: The translation for this entry is currently under quality review. Some content is temporarily displayed in English only.
adjacency list
This term is a technical specification within graph theory and computer science. It describes a memory-efficient way to store a graph, particularly when the graph is sparse, meaning most possible connections between nodes do not exist. It is typically contrasted with an adjacency matrix, which uses a two-dimensional array and consumes more space regardless of the number of edges.
In practical implementation, an adjacency list is often realized as an array of linked lists or dynamic arrays. Because it only stores existing edges, it allows for faster iteration over the neighbors of a specific vertex, making it the preferred choice for algorithms like Breadth-First Search (BFS) and Depth-First Search (DFS).
Ý nghĩa
A data structure used in computer science to represent a graph, consisting of a collection of unordered lists where each list describes the set of neighbors of a particular vertex.
The algorithm iterates through the adjacency list to find all nodes connected to the starting vertex.